package itdfq.ydd.Behavior_Patters.zhongjiezhe;

/**
 * @Author GocChin
 * @Date 2021/5/17 20:49
 * @Blog: itdfq.com
 * @QQ: 909256107
 * @Descript: 出租者类
 */
public class Saler {
    private String NO;
    private String name;
    private Mediator me;

    public Saler(String no, String name, Mediator me) {
        this.NO = no;
        this.name = name;
        this.me = me;
    }

    public String getNO() {
        return NO;
    }
    public String getName() {
        return name;
    }

    public void receive(String msg) {
        System.out.println(NO+"\t"+name+"receive:");
        System.out.println("\t"+msg);
    }

    public void send(String msg) {
        me.send(this, msg);
    }

}
